<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">
        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title">基本信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">款项摘要</td><td id="zhai" class="tv" colspan="3"></td></tr>
                <tr><td class="tt">调出(付款)账户</td><td id="chuid_name" class="tv colorlan"></td><td class="tt">款项类型(支出)</td><td id="zhiqilei_name" class="tv"></td></tr>
                <tr><td class="tt">调入(收款)账户</td><td id="ruid_name" class="tv colorlan"></td><td class="tt">款项类型(收入)</td><td id="shouqilei_name" class="tv"></td></tr>
                <tr><td class="tt">转账金额(元)</td><td id="money" class="tv"></td><td class="tt">手续费(元)</td><td id="shoufee" class="tv"></td></tr>
                <tr><td class="tt">交易日期</td><td id="dt" class="tv"></td><td class="tt">经手人</td><td id="baner" class="tv"></td></tr>
                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>
        <div class="table-box tablenes">
            <div class="title">支付信息(出纳)</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">支付状态</td><td class="tv" id="paystate_name"></td><td class="tt">最近支付日期</td><td class="tv" id="paylastdt"></td></tr>
                <tr><td class="tt">已支付金额(元)</td><td class="tv" id="payfee"></td><td class="tt">未支付金额(元)</td><td class="tv" id="paynofee"></td></tr>
                </tbody>
            </table>
        </div>
        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>

        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_account_diao_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;
                var chuaccount = res.data.chuaccount;
                var ruaccount = res.data.ruaccount;


                if(chuaccount){
                    $("#chuid_name").text(chuaccount.name+'('+chuaccount.accnum+')').click(function () {
                        openPage('../account/show.php?id='+chuaccount.id);
                    });
                }
                if(ruaccount){
                    $("#ruid_name").text(ruaccount.name+'('+ruaccount.accnum+')').click(function () {
                        openPage('../account/show.php?id='+ruaccount.id);
                    });
                }





                $("#zhai").text(data.zhai);
                $("#money").text(parseFormatNum(data.money));
                $("#shoufee").text(parseFormatNum(data.shoufee));
                $("#dt").text(data.dt);
                $("#baner").text(data.baner);
                $("#explain").text(data.explain);
                $("#zhiqilei_name").text(data.zhiqilei_name);
                $("#shouqilei_name").text(data.shouqilei_name);


                var kuaninfo = res.data.kuaninfo;
                if(kuaninfo){
                    $("#paystate_name").text(kuaninfo.paystate_name);
                    $("#paylastdt").text(kuaninfo.paylastdt);
                    $("#payfee").text(parseFormatNum(kuaninfo.payfee)).addClass('colorlan').click(function () {
                        openNavPage('查看交易明细信息','account_list/index.php?kuanid='+kuaninfo.id);
                    });
                    $("#paynofee").text(parseFormatNum(kuaninfo.paynofee));
                }

                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('account_diao', param_id);
    });



</script>
</body>
</html>




